Users encounter a variety of documents on a daily basis such as bills, tickets, letters, notebook pages, financial statements, and so on. Managing these physical documents can be cumbersome and may require a substantial amount of physical storage over time. With advances in digital technology, users can convert these physical documents into digital files by scanning the documents to reduce physical storage requirements and better manage the documents. A further development is the proliferation of mobile devices, such as smartphones, that have an integrated camera that allows a user to photograph a document and store the photograph as a digital file. These mobile devices are being increasingly used as the device of choice for converting physical documents to a digital format.
Conventional techniques used by mobile devices to capture an image of a document, however, can be problematic. For instance, when capturing an image a document with a camera, background clutter may be included in the image. To remove the background clutter and keep only the document in the image, the document in the image must be separated from the background clutter. Conventional techniques used by mobile devices that have limited processing capabilities typically lack this complex functionality to separate foreground objects (e.g., the document) from the background clutter to allow the background clutter to be removed from the image. Consequently, the quality of the captured image is reduced and the user is forced to manually trace boundaries of the document in the image to apply a crop operation that removes portions of the image that lie outside the traced boundaries of the document, such as the background clutter. Further complications can arise when the document is photographed at an angle instead of directly from the top of the document, resulting in an incorrect perspective of the document and not eliminating the background completely even manually or even if eliminating the background completely manually then still chopping off some portion of the document. Accordingly, conventional techniques are laden with complications and inefficiencies that can result in significant inaccuracies.